# Maintainer : Felix Yan <felixonmars@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=python-pyopenssl
pkgver=23.1.1
pkgrel=2
arch=('any')
pkgdesc="Python3 wrapper module around the OpenSSL library"
url='https://github.com/pyca/pyopenssl'
license=('Apache')
depends=('python-cryptography')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-pretend' 'python-flaky')
source=(https://github.com/pyca/pyopenssl/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha512sums=('38350f2db0b93f2f501cf1c185bebdeb5cf6313eede492ed4dcd8750f22218c8b669b398728de8d62481c2f87055b4138949cfd3f7f6cf4002d1ba5860b1330d')

prepare() {
  export LC_CTYPE=en_US.UTF-8
}

build() {
  cd pyopenssl-$pkgver
  python setup.py build
}

check() {
  cd pyopenssl-$pkgver
  PYTHONPATH="$PWD"/build/lib pytest
}

package() {
  cd pyopenssl-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}

# vim: ts=2 sw=2 et:
